<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return=array();
	exi($return);
}
if($_RQ['op']=='getvideocall'){
	if($_SESSION['uid']){
		$videocall=pdo_get('jy_yiliao_chat',array('mid OR'=>'mid='.$_SESSION['uid'].' or tomid='.$_SESSION['uid'],'tocalltime >'=>time()-600,'uniacid'=>$_SESSION['uniacid'],'status'=>1,'callmid <>'=>$_SESSION['uid']));
		$videocall['tomid']=$videocall['mid']==$_SESSION['uid']?$videocall['tomid']:$videocall['mid'];
		$member=model('core/member')->detail($videocall['tomid']);
		$videocall['nickname']=$member['nickname']?:$member['username'];
	}
	$return['videocall']=$videocall;
	exi($return);
}
?>